import request from './request.js'

//取消行程
function cancelOrder(data) {
    return request({
                data  : data,
                method: "POST",
                url   : 'trip/ordercancel'
            })
}

//订单详情
function getDetailsOrder(data) {
    return request({
                data  : data,
                method: "POST",
                url   : 'trip/orderdetail'
            })
}
//补充旅游信息
function setDetailsOrder(data) {
    return request({
                       data  : data,
                       method: "POST",
                       url   : 'trip/orderupdate'
                   })
}
//检测VIP是否可抵扣
function getVipUse(data) {
    return request({
                       data  : data,
                       method: "POST",
                       url   : 'trip/isrelief'
                   })
}
function shopDelOrder(data){
    return request({
                       data  : data,
                       method: "POST",
                       url   : 'goods/orderdel'
                   })
}
function shopCalOrder(data){
    return request({
                       data  : data,
                       method: "POST",
                       url   : 'goods/ordercancel'
                   })
}
function getCancelRate(data){
    return request({
                       data  : data,
                       method: "POST",
                       url   : 'trip/orderCancelPolicy'
                   })
}
//---------------------------
//商城订单详情
function getShopOrderDetails(data){
    return request({
                       data  : data,
                       method: "POST",
                       url   : 'goods/myorderdetail'
                   })
}
//删除商城订单
function delShopOrder(data){
    return request({
                       data  : data,
                       method: "POST",
                       url   : 'goods/orderdel'
                   })
}
//取消商城订单
function cancelShopOrder(data){
    return request({
                       data  : data,
                       method: "POST",
                       url   : 'goods/ordercancel'
                   })
}
export default {
    cancelOrder,
    getDetailsOrder,
    setDetailsOrder,
    getVipUse,
    shopDelOrder,
    shopCalOrder,
    getCancelRate,
    getShopOrderDetails,
    delShopOrder,
    cancelShopOrder
}